import 'package:flutter_test/flutter_test.dart';
import 'package:flutter_app_badge_ohos/flutter_app_badge_ohos.dart';
import 'package:flutter_app_badge_ohos/flutter_app_badge_ohos_platform_interface.dart';
import 'package:flutter_app_badge_ohos/flutter_app_badge_ohos_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockFlutterAppBadgeOhosPlatform
    with MockPlatformInterfaceMixin
    implements FlutterAppBadgeOhosPlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');
}

void main() {
  final FlutterAppBadgeOhosPlatform initialPlatform = FlutterAppBadgeOhosPlatform.instance;

  test('$MethodChannelFlutterAppBadgeOhos is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelFlutterAppBadgeOhos>());
  });

  test('getPlatformVersion', () async {
    FlutterAppBadgeOhos flutterAppBadgeOhosPlugin = FlutterAppBadgeOhos();
    MockFlutterAppBadgeOhosPlatform fakePlatform = MockFlutterAppBadgeOhosPlatform();
    FlutterAppBadgeOhosPlatform.instance = fakePlatform;

    expect(await flutterAppBadgeOhosPlugin.getPlatformVersion(), '42');
  });
}
